<template>
	<view class="default-box">
		<uni-calendar 
			:insert="true"
			:lunar="false"
			@confirm="confirm"
			:schedule="props.schedule"
			@change="dateChange"
		/>
	</view>
</template>

<script setup lang="ts">
import { onMounted, ref } from 'vue';
const emits = defineEmits(['change'])

const props = defineProps({
	schedule: {
		type: Array,
		default() {
			return []
		}
	}
})

const confirm = (e:any):void => {
	console.log(e)
}
const dateChange = (e:any):void => {
	emits("change", e)
}

onMounted(() => {
	// console.log(props.schedule)
})
</script>

<style lang="stylus" scoped>
.default-box
	padding 24rpx 28rpx

</style>